home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 43
/
Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso
/
Aminet
/
hard
/
drivr
/
opencnet.lha
/
opencnet.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-04-11
|
595b
|
28 lines
#include <exec/types.h>
#include <devices/sana2.h>
#include <dos/dos.h>
#include <clib/alib_protos.h>
#include <clib/exec_protos.h>
VOID main(VOID)
{
struct IOSana2Req *cnetReqBlk;
struct MsgPort *cnetPort;
if(cnetPort=CreatePort(NULL, NULL))
{
if(cnetReqBlk=(struct IOSana2Req *)CreateExtIO(cnetPort, sizeof(struct IOSana2Req)))
{
if(!OpenDevice("Networks/cnet.device", 0, (struct IORequest *)cnetReqBlk, NULL))
{
Wait(SIGBREAKF_CTRL_C);
CloseDevice((struct IORequest *)cnetReqBlk);
}
DeleteExtIO((struct IORequest *)cnetReqBlk);
}
DeletePort(cnetPort);
}
}